package main

import (
	"log"
	"time"
)

func main() {
	defer func() {
		err := recover()
		if err != nil {
			log.Println("=", err)
		}
	}()
	go a()
	time.Sleep(10 * time.Second)
}

func a() {
	for i := 0; i < 100; i++ {
		if i == 3 {
			panic("a panic")
		}
		time.Sleep(1 * time.Second)
	}
}
